# Maintainer: Will Sinatra <wpsinatra@gmail.com>
pkgname=font-iosevka
pkgver=28.0.3
pkgrel=0
pkgdesc="Versatile typeface for code, from code"
url="https://typeof.net/Iosevka/"
arch="noarch"
options="!check" # no testsuite
license="OFL-1.1"
depends="fontconfig"
subpackages="
	$pkgname-base
	$pkgname-aile
	$pkgname-slab
	$pkgname-curly
	$pkgname-curly-slab:curly_slab
	"
source="
	https://github.com/be5invis/Iosevka/releases/download/v$pkgver/PkgTTC-Iosevka-$pkgver.zip
	https://github.com/be5invis/Iosevka/releases/download/v$pkgver/PkgTTC-IosevkaAile-$pkgver.zip
	https://github.com/be5invis/Iosevka/releases/download/v$pkgver/PkgTTC-IosevkaSlab-$pkgver.zip
	https://github.com/be5invis/Iosevka/releases/download/v$pkgver/PkgTTC-IosevkaCurly-$pkgver.zip
	https://github.com/be5invis/Iosevka/releases/download/v$pkgver/PkgTTC-IosevkaCurlySlab-$pkgver.zip
	"

builddir="$srcdir"

package() {
	depends="
		$pkgname-base=$pkgver-r$pkgrel
		$pkgname-aile=$pkgver-r$pkgrel
		$pkgname-slab=$pkgver-r$pkgrel
		$pkgname-curly=$pkgver-r$pkgrel
		$pkgname-curly-slab=$pkgver-r$pkgrel
		"

	install -Dm644 "$builddir"/*.ttc \
		-t "$pkgdir"/usr/share/fonts/${pkgname#font-}
}

base() {
	pkgdesc="$pkgdesc (Iosevka)"
	amove usr/share/fonts/iosevka/Iosevka-*.ttc
}

aile() {
	pkgdesc="$pkgdesc (Iosevka Aile)"
	amove usr/share/fonts/iosevka/IosevkaAile-*.ttc
}

slab() {
	pkgdesc="$pkgdesc (Iosevka Slab)"
	amove usr/share/fonts/iosevka/IosevkaSlab-*.ttc
}

curly() {
	pkgdesc="$pkgdesc (Iosevka Curly)"
	amove usr/share/fonts/iosevka/IosevkaCurly-*.ttc
}

curly_slab() {
	pkgdesc="$pkgdesc (Iosevka Curly Slab)"
	amove usr/share/fonts/iosevka/IosevkaCurlySlab-*.ttc
}

sha512sums="
0226e27fc9c0ebad721b860d19bebb05b00bec4067ac48255c6cd75ad3b50bfebf6794dfe85c84e8b19a0bfd26b4fddf432e134863c1b0af6612e0fa73b94dc7  PkgTTC-Iosevka-28.0.3.zip
afbe9a87748ebdcbfdda14c9b94e2ef6b48e697b692e405be757c8fcaee4602f4b99bf1645cb6b25104e139ff5707a4c8463e69bc2947e4e47b019fd706a4910  PkgTTC-IosevkaAile-28.0.3.zip
d0148c2b8ffb5f668cff72b4ded08fb43e709c33e74d960f1a3817e8f3aa0a6dd48fdff8a8a471075a5ef8939ba64da3af50f92253931f9fe5494b1fd8cecd31  PkgTTC-IosevkaSlab-28.0.3.zip
2e213ecc7f5c4df3b9e547f3091ef8f2d158fa38457ee05e1eae7cbd0ae87b7fb5802e8f7b7fd2e75cc046d80c681eb8b05be0d336c20f559398200b60b21ab3  PkgTTC-IosevkaCurly-28.0.3.zip
3867ec7aa374968f74352a6bcde54ee503f7177857ba42fec128c6c50fc3494e6d485c3bb1fc03c37bbc1e56df9ce02ef6997d3c18719f690dfb7e1c833b74c2  PkgTTC-IosevkaCurlySlab-28.0.3.zip
"
